#ifndef		__QTTCPSOCKET_H__
# define	__QTTCPSOCKET_H__

#include	<QObject>
#include	<QtNetwork>
#include	<QTcpSocket>
#include	"ITCPSocket.h"

class QtTCPSocket : public ITCPSocket, public QObject
{
 public:
  ~QtTCPSocket();
  QtTCPSocket(std::string&, unsigned int);
  QtTCPSocket& operator=(const QtTCPSocket&);
  QtTCPSocket();

 private:
  QtTCPSocket(const QtTCPSocket&);
  void onRead();

 public:
  virtual int read(std::string&);
  virtual int write(std::string&, unsigned int);
  virtual void connect();
  virtual void accept();
  virtual void close();

 private:
  QTcpSocket*	_socket;
  QString	_hostName;
  unsigned int	_port;
  QString	_buffer;
};

#endif		/*__QTTCPSOCKET_H__*/
